package com.party.core.model.analysis;

import com.party.core.model.BaseModel;

import java.io.Serializable;
import java.util.Objects;

/**
 * @program: party-temp
 * @description: 页面流程
 * @author: Huaqunhao
 * @create: 2018-08-01 09:13
 **/
public class StatisticsPageFlow extends BaseModel implements Serializable {
    private static final long serialVersionUID = 5975833067021229986L;

    public StatisticsPageFlow() {
    }

    public StatisticsPageFlow(String url, String uniqueCode) {
        this.url = url;
        this.uniqueCode = uniqueCode;
    }

    // 用户编号
    private String userId;
    // 品牌
    private String brand;
    // 设备型号
    private String uniteType;
    // 操作系统+
    private String os;
    // ip地址
    private String ip;
    // 运营商(联通/移动)
    private String operator;
    // 联网方式(3g/4g/wifi)
    private String netWay;
    // 分辨率
    private String dpi;
    // 合作商编号
    private String partnerId;
    // 父级编号
    private String parentId;
    // 父级编号集合
    private String parentIds;
    // 页面名称
    private String name;
    // 页面地址
    private String url;
    // 唯一码
    private String uniqueCode;
    // 标识为开始
    private Integer isStart;
    // 标识为结束
    private Integer isEnd;
    // 停留时长
    private Long stayTime;
    // 浏览器类型
    private String brower;
    // 页面加载到读取文档的时间差
    private long netAll;
    // Dns域名查询时间
    private long netDns;
    // TCP完成握手时间
    private long netTcp;
    // http接收完成的时间
    private long srv;
    // DOM树解析时间
    private long dom;
    // 页面加载时间
    private long loadEvent;
    // 机构名称
    private String partnerName;
    // 模块名称
    private String module;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getUniteType() {
        return uniteType;
    }

    public void setUniteType(String uniteType) {
        this.uniteType = uniteType;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getNetWay() {
        return netWay;
    }

    public void setNetWay(String netWay) {
        this.netWay = netWay;
    }

    public String getDpi() {
        return dpi;
    }

    public void setDpi(String dpi) {
        this.dpi = dpi;
    }

    public String getPartnerId() {
        return partnerId;
    }

    public void setPartnerId(String partnerId) {
        this.partnerId = partnerId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentIds() {
        return parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUniqueCode() {
        return uniqueCode;
    }

    public void setUniqueCode(String uniqueCode) {
        this.uniqueCode = uniqueCode;
    }

    public Integer getIsStart() {
        return isStart;
    }

    public void setIsStart(Integer isStart) {
        this.isStart = isStart;
    }

    public Integer getIsEnd() {
        return isEnd;
    }

    public void setIsEnd(Integer isEnd) {
        this.isEnd = isEnd;
    }

    public Long getStayTime() {
        return stayTime;
    }

    public void setStayTime(Long stayTime) {
        this.stayTime = stayTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBrower() {
        return brower;
    }

    public void setBrower(String brower) {
        this.brower = brower;
    }

    public long getNetAll() {
        return netAll;
    }

    public void setNetAll(long netAll) {
        this.netAll = netAll;
    }

    public long getNetDns() {
        return netDns;
    }

    public void setNetDns(long netDns) {
        this.netDns = netDns;
    }

    public long getNetTcp() {
        return netTcp;
    }

    public void setNetTcp(long netTcp) {
        this.netTcp = netTcp;
    }

    public long getSrv() {
        return srv;
    }

    public void setSrv(long srv) {
        this.srv = srv;
    }

    public long getDom() {
        return dom;
    }

    public void setDom(long dom) {
        this.dom = dom;
    }

    public long getLoadEvent() {
        return loadEvent;
    }

    public void setLoadEvent(long loadEvent) {
        this.loadEvent = loadEvent;
    }

    public String getPartnerName() {
        return partnerName;
    }

    public void setPartnerName(String partnerName) {
        this.partnerName = partnerName;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof StatisticsPageFlow)) return false;
        if (!super.equals(o)) return false;
        StatisticsPageFlow pageFlow = (StatisticsPageFlow) o;
        return getNetAll() == pageFlow.getNetAll() &&
                getNetDns() == pageFlow.getNetDns() &&
                getNetTcp() == pageFlow.getNetTcp() &&
                getSrv() == pageFlow.getSrv() &&
                getDom() == pageFlow.getDom() &&
                getLoadEvent() == pageFlow.getLoadEvent() &&
                Objects.equals(getUserId(), pageFlow.getUserId()) &&
                Objects.equals(getBrand(), pageFlow.getBrand()) &&
                Objects.equals(getUniteType(), pageFlow.getUniteType()) &&
                Objects.equals(getOs(), pageFlow.getOs()) &&
                Objects.equals(getIp(), pageFlow.getIp()) &&
                Objects.equals(getOperator(), pageFlow.getOperator()) &&
                Objects.equals(getNetWay(), pageFlow.getNetWay()) &&
                Objects.equals(getDpi(), pageFlow.getDpi()) &&
                Objects.equals(getPartnerId(), pageFlow.getPartnerId()) &&
                Objects.equals(getParentId(), pageFlow.getParentId()) &&
                Objects.equals(getParentIds(), pageFlow.getParentIds()) &&
                Objects.equals(getName(), pageFlow.getName()) &&
                Objects.equals(getUrl(), pageFlow.getUrl()) &&
                Objects.equals(getUniqueCode(), pageFlow.getUniqueCode()) &&
                Objects.equals(getIsStart(), pageFlow.getIsStart()) &&
                Objects.equals(getIsEnd(), pageFlow.getIsEnd()) &&
                Objects.equals(getStayTime(), pageFlow.getStayTime()) &&
                Objects.equals(getBrower(), pageFlow.getBrower());
    }

    @Override
    public int hashCode() {

        return Objects.hash(super.hashCode(), getUserId(), getBrand(), getUniteType(), getOs(), getIp(), getOperator(), getNetWay(), getDpi(), getPartnerId(), getParentId(), getParentIds(), getName(), getUrl(), getUniqueCode(), getIsStart(), getIsEnd(), getStayTime(), getBrower(), getNetAll(), getNetDns(), getNetTcp(), getSrv(), getDom(), getLoadEvent());
    }

    @Override
    public String toString() {
        return "StatisticsPageFlow{" +
                "userId='" + userId + '\'' +
                ", brand='" + brand + '\'' +
                ", uniteType='" + uniteType + '\'' +
                ", os='" + os + '\'' +
                ", ip='" + ip + '\'' +
                ", operator='" + operator + '\'' +
                ", netWay='" + netWay + '\'' +
                ", dpi='" + dpi + '\'' +
                ", partnerId='" + partnerId + '\'' +
                ", parentId='" + parentId + '\'' +
                ", parentIds='" + parentIds + '\'' +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", uniqueCode='" + uniqueCode + '\'' +
                ", isStart=" + isStart +
                ", isEnd=" + isEnd +
                ", stayTime=" + stayTime +
                ", brower='" + brower + '\'' +
                ", netAll=" + netAll +
                ", netDns=" + netDns +
                ", netTcp=" + netTcp +
                ", srv=" + srv +
                ", dom=" + dom +
                ", loadEvent=" + loadEvent +
                '}';
    }
}
